<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="get">
    <input type="email" name id="tel " readonly pattern="^[3-9]{9}$">
 <button type="submit">提交</button>
</form>
</body>
<script type="text/javascript">
    var tel=document.getElementById("tel").value;
    var reg=/^1[3-9][0-9]{9}$;
    var f=reg.test(tel);
    if(!f){
        alert("电话号码格式有误");
    }
</script>
</html>